package com.maganda.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DocumentoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DocumentoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIddocumentoIsNull() {
            addCriterion("IDDOCUMENTO is null");
            return (Criteria) this;
        }

        public Criteria andIddocumentoIsNotNull() {
            addCriterion("IDDOCUMENTO is not null");
            return (Criteria) this;
        }

        public Criteria andIddocumentoEqualTo(Integer value) {
            addCriterion("IDDOCUMENTO =", value, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoNotEqualTo(Integer value) {
            addCriterion("IDDOCUMENTO <>", value, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoGreaterThan(Integer value) {
            addCriterion("IDDOCUMENTO >", value, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoGreaterThanOrEqualTo(Integer value) {
            addCriterion("IDDOCUMENTO >=", value, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoLessThan(Integer value) {
            addCriterion("IDDOCUMENTO <", value, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoLessThanOrEqualTo(Integer value) {
            addCriterion("IDDOCUMENTO <=", value, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoIn(List<Integer> values) {
            addCriterion("IDDOCUMENTO in", values, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoNotIn(List<Integer> values) {
            addCriterion("IDDOCUMENTO not in", values, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoBetween(Integer value1, Integer value2) {
            addCriterion("IDDOCUMENTO between", value1, value2, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andIddocumentoNotBetween(Integer value1, Integer value2) {
            addCriterion("IDDOCUMENTO not between", value1, value2, "iddocumento");
            return (Criteria) this;
        }

        public Criteria andNombreIsNull() {
            addCriterion("NOMBRE is null");
            return (Criteria) this;
        }

        public Criteria andNombreIsNotNull() {
            addCriterion("NOMBRE is not null");
            return (Criteria) this;
        }

        public Criteria andNombreEqualTo(String value) {
            addCriterion("NOMBRE =", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreNotEqualTo(String value) {
            addCriterion("NOMBRE <>", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreGreaterThan(String value) {
            addCriterion("NOMBRE >", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreGreaterThanOrEqualTo(String value) {
            addCriterion("NOMBRE >=", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreLessThan(String value) {
            addCriterion("NOMBRE <", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreLessThanOrEqualTo(String value) {
            addCriterion("NOMBRE <=", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreLike(String value) {
            addCriterion("NOMBRE like", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreNotLike(String value) {
            addCriterion("NOMBRE not like", value, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreIn(List<String> values) {
            addCriterion("NOMBRE in", values, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreNotIn(List<String> values) {
            addCriterion("NOMBRE not in", values, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreBetween(String value1, String value2) {
            addCriterion("NOMBRE between", value1, value2, "nombre");
            return (Criteria) this;
        }

        public Criteria andNombreNotBetween(String value1, String value2) {
            addCriterion("NOMBRE not between", value1, value2, "nombre");
            return (Criteria) this;
        }

        public Criteria andGrupoIsNull() {
            addCriterion("GRUPO is null");
            return (Criteria) this;
        }

        public Criteria andGrupoIsNotNull() {
            addCriterion("GRUPO is not null");
            return (Criteria) this;
        }

        public Criteria andGrupoEqualTo(String value) {
            addCriterion("GRUPO =", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoNotEqualTo(String value) {
            addCriterion("GRUPO <>", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoGreaterThan(String value) {
            addCriterion("GRUPO >", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoGreaterThanOrEqualTo(String value) {
            addCriterion("GRUPO >=", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoLessThan(String value) {
            addCriterion("GRUPO <", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoLessThanOrEqualTo(String value) {
            addCriterion("GRUPO <=", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoLike(String value) {
            addCriterion("GRUPO like", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoNotLike(String value) {
            addCriterion("GRUPO not like", value, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoIn(List<String> values) {
            addCriterion("GRUPO in", values, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoNotIn(List<String> values) {
            addCriterion("GRUPO not in", values, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoBetween(String value1, String value2) {
            addCriterion("GRUPO between", value1, value2, "grupo");
            return (Criteria) this;
        }

        public Criteria andGrupoNotBetween(String value1, String value2) {
            addCriterion("GRUPO not between", value1, value2, "grupo");
            return (Criteria) this;
        }

        public Criteria andEstadoIsNull() {
            addCriterion("ESTADO is null");
            return (Criteria) this;
        }

        public Criteria andEstadoIsNotNull() {
            addCriterion("ESTADO is not null");
            return (Criteria) this;
        }

        public Criteria andEstadoEqualTo(String value) {
            addCriterion("ESTADO =", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotEqualTo(String value) {
            addCriterion("ESTADO <>", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoGreaterThan(String value) {
            addCriterion("ESTADO >", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoGreaterThanOrEqualTo(String value) {
            addCriterion("ESTADO >=", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoLessThan(String value) {
            addCriterion("ESTADO <", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoLessThanOrEqualTo(String value) {
            addCriterion("ESTADO <=", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoLike(String value) {
            addCriterion("ESTADO like", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotLike(String value) {
            addCriterion("ESTADO not like", value, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoIn(List<String> values) {
            addCriterion("ESTADO in", values, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotIn(List<String> values) {
            addCriterion("ESTADO not in", values, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoBetween(String value1, String value2) {
            addCriterion("ESTADO between", value1, value2, "estado");
            return (Criteria) this;
        }

        public Criteria andEstadoNotBetween(String value1, String value2) {
            addCriterion("ESTADO not between", value1, value2, "estado");
            return (Criteria) this;
        }

        public Criteria andFeccreacionIsNull() {
            addCriterion("FECCREACION is null");
            return (Criteria) this;
        }

        public Criteria andFeccreacionIsNotNull() {
            addCriterion("FECCREACION is not null");
            return (Criteria) this;
        }

        public Criteria andFeccreacionEqualTo(Date value) {
            addCriterion("FECCREACION =", value, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionNotEqualTo(Date value) {
            addCriterion("FECCREACION <>", value, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionGreaterThan(Date value) {
            addCriterion("FECCREACION >", value, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionGreaterThanOrEqualTo(Date value) {
            addCriterion("FECCREACION >=", value, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionLessThan(Date value) {
            addCriterion("FECCREACION <", value, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionLessThanOrEqualTo(Date value) {
            addCriterion("FECCREACION <=", value, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionIn(List<Date> values) {
            addCriterion("FECCREACION in", values, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionNotIn(List<Date> values) {
            addCriterion("FECCREACION not in", values, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionBetween(Date value1, Date value2) {
            addCriterion("FECCREACION between", value1, value2, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFeccreacionNotBetween(Date value1, Date value2) {
            addCriterion("FECCREACION not between", value1, value2, "feccreacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionIsNull() {
            addCriterion("FECMODIFCACION is null");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionIsNotNull() {
            addCriterion("FECMODIFCACION is not null");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionEqualTo(Date value) {
            addCriterion("FECMODIFCACION =", value, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionNotEqualTo(Date value) {
            addCriterion("FECMODIFCACION <>", value, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionGreaterThan(Date value) {
            addCriterion("FECMODIFCACION >", value, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionGreaterThanOrEqualTo(Date value) {
            addCriterion("FECMODIFCACION >=", value, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionLessThan(Date value) {
            addCriterion("FECMODIFCACION <", value, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionLessThanOrEqualTo(Date value) {
            addCriterion("FECMODIFCACION <=", value, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionIn(List<Date> values) {
            addCriterion("FECMODIFCACION in", values, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionNotIn(List<Date> values) {
            addCriterion("FECMODIFCACION not in", values, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionBetween(Date value1, Date value2) {
            addCriterion("FECMODIFCACION between", value1, value2, "fecmodifcacion");
            return (Criteria) this;
        }

        public Criteria andFecmodifcacionNotBetween(Date value1, Date value2) {
            addCriterion("FECMODIFCACION not between", value1, value2, "fecmodifcacion");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}